feat: Add support for notification push type widgets#194
feat: Add support for notification push type widgets#194dwrss wants to merge 3 commits intoparse-community:masterfrom
widgets#194Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds APS support for a "content-changed" flag: TypeScript typings extended, runtime APS setter added, a generated chainable Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @index.d.ts:
- Line 270: The union type NotificationPushType includes an invalid value
'widgets'; remove 'widgets' from the NotificationPushType declaration so the
type union matches Apple APNs valid push types (alert, background, location,
voip, complication, fileprovider, mdm, liveactivity, pushtotalk). Also audit the
code that sets the apns-push-type header (the logic around pushType usage in
lib/notification/index.js) and, if needed, add validation to reject or map
unsupported values before sending to APNs so only documented types are allowed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #194 +/- ##
==========================================
+ Coverage 95.86% 95.87% +0.01%
==========================================
Files 23 23
Lines 846 849 +3
==========================================
+ Hits 811 814 +3
Misses 35 35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
widgets
d102112 to
d059556
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@index.d.ts`:
- Around line 370-373: The declaration for contentChanged currently uses boolean
but the runtime setter (see lib/notification/apsProperties.js) treats allowed
set values as true | 1 and clears the field on undefined/other falsy values;
update the index.d.ts declaration for the public property contentChanged to
reflect the runtime contract (allow true and numeric 1 as valid set values and
undefined to clear) so TypeScript callers can express setting and clearing
correctly (locate the contentChanged property in the type/class declaration and
change its type accordingly).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a7909c75-4ee3-4280-b713-64be07eabf0a
📒 Files selected for processing (4)
index.d.tslib/notification/apsProperties.jslib/notification/index.jstest/notification/apsProperties.js
✅ Files skipped from review due to trivial changes (2)
- lib/notification/apsProperties.js
- test/notification/apsProperties.js
🚧 Files skipped from review as they are similar to previous changes (1)
- lib/notification/index.js
d059556 to
29c6a90
Compare
Required for sending Widget update notifications
29c6a90 to
29d1ec4
Compare
As per Apple's documentation "widgets" is now a valid push type: https://developer.apple.com/documentation/widgetkit/updating-widgets-with-widgetkit-push-notifications
Summary by CodeRabbit
New Features
Tests